/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.Controller;

import com.DAO.TipoCampoDAO;
import com.thoughtworks.xstream.XStream;
import java.util.List;
import javax.jws.WebMethod;
import javax.jws.WebService;

/**
 *
 * @author Fellipe
 */
@WebService(serviceName = "TipoCampo")
public class TipoCampo {
    
    private TipoCampoDAO tc = new TipoCampoDAO();
    private XStream xstream = new XStream();
    
    @WebMethod(operationName = "read")
    public String readTipoCampo() {
        
        return toXMLTipoCampoList(tc.read());
        
    }
    
    private String toXMLTipoCampoList(List<com.Model.TipoCampo> lista) {
        
        return xstream.toXML(lista);
        
    }
    
}